var express = require('express');
var router = express.Router();
var query = require('../util/dbHelper.js');//引入连接池，
var category = require("../data/category.js");
router.post("/all",(req,res,next)=> {
    req.myPromise = query("SELECT * FROM `dt_mi_category`;")
        .then(results => {
            return {status:200,message:"",data:results};
        });
    next();
});
router.post("/lump",(req,res,next)=>{//
    req.myPromise = query("SELECT * FROM `dt_mi_categorylist`;")
        .then(results => {
            return {status:200,message:"",data:results};
        });
    next();
});

module.exports = router;
